<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 

class Block_Admin_Post_Edit_Tab_General extends Core_Block {

	protected function _beforeRender() {
		$this->getChild('category_select')->setSelectedCategoryId($this->getFormObject()->getCategory());
	}
	
	public function getSelect($a, $b) {
		return $a == $b ? ' selected="selected"' : '';
	}
	
	public function getStatus() {
		$col = App::object('Entity_Status')->getCollection();
		$col->getSelect()->order('sort_order');
		return $col;
	}
}